<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      ntfs-3g-2017.3.23
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;5.&nbsp;File Systems and Disk Management
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="mdadm.html" title="mdadm-4.1">Prev</a>
          <p>
            mdadm-4.1
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="gptfdisk.html" title=
          "gptfdisk-1.0.5">Next</a>
          <p>
            gptfdisk-1.0.5
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="filesystems.html" title=
          "Chapter&nbsp;5.&nbsp;File Systems and Disk Management">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="ntfs-3g" name="ntfs-3g"></a>ntfs-3g-2017.3.23
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to Ntfs-3g
        </h2>
        <p>
          The <span class="application">Ntfs-3g</span> package contains a
          stable, read-write open source driver for NTFS partitions. NTFS
          partitions are used by most Microsoft operating systems. Ntfs-3g
          allows you to mount NTFS partitions in read-write mode from your
          Linux system. It uses the FUSE kernel module to be able to
          implement NTFS support in user space. The package also contains
          various utilities useful for manipulating NTFS partitions.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz">
                https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: d97474ae1954f772c6d2fa386a6f462c
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 1.2 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 20 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.2 SBU
              </p>
            </li>
          </ul>
        </div>
        <h3>
          Ntfs-3g Dependencies
        </h3>
        <h4>
          Optional
        </h4>
        <p class="optional">
          <a class="ulink" href="https://github.com/libfuse/libfuse">fuse
          2.x</a> (this disables user mounts)
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/ntfs-3g">http://wiki.linuxfromscratch.org/blfs/wiki/ntfs-3g</a>
        </p>
      </div>
      <div class="kernel" lang="en" xml:lang="en">
        <h2 class="sect2">
          <a id="ntfs-3g-kernel" name="ntfs-3g-kernel"></a>Kernel
          Configuration
        </h2>
        <p>
          Enable the following options in the kernel configuration and
          recompile the kernel if necessary:
        </p>
        <pre class="screen">
<code class="literal">File systems  ---&gt;
  &lt;*/M&gt; FUSE (Filesystem in Userspace) support [CONFIG_FUSE_FS]</code>
</pre>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of Ntfs-3g
        </h2>
        <p>
          Install <span class="application">Ntfs-3g</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr        \
            --disable-static     \
            --with-fuse=internal &amp;&amp;
make</kbd>
</pre>
        <p>
          This package does not come with a test suite.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install &amp;&amp;
ln -sv ../bin/ntfs-3g /sbin/mount.ntfs &amp;&amp;
ln -sv ntfs-3g.8 /usr/share/man/man8/mount.ntfs.8</kbd>
</pre>
        <p>
          If you want ordinary users to be able to mount NTFS partitions
          you'll need to set mount.ntfs with the root user ID. Note: it is
          probably unsafe to do this on a computer that needs to be secure
          (like a server). As the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">chmod -v 4755 /bin/ntfs-3g</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <em class="parameter"><code>--disable-static</code></em>: This
          switch prevents installation of static versions of the libraries.
        </p>
        <p>
          <em class="parameter"><code>--with-fuse=internal</code></em>: This
          switch dynamically forces <span class="application">ntfs-3g</span>
          to use an internal copy of the <span class=
          "application">fuse-2.x</span> library. This is required if you wish
          to allow users to mount NTFS partitions.
        </p>
        <p>
          <code class="option">--disable-ntfsprogs</code>: Disables
          installation of various utilities used to manipulate NTFS
          partitions.
        </p>
        <p>
          <span class="command"><strong>ln -sv ../bin/ntfs-3g
          /sbin/mount.ntfs</strong></span>: Creating /sbin/mount.ntfs makes
          <span class="command"><strong>mount</strong></span> default to
          using Ntfs-3g to mount NTFS partitions.
        </p>
        <p>
          <span class="command"><strong>chmod -v 4755
          /bin/ntfs-3g</strong></span>: Making mount.ntfs setuid root allows
          non root users to mount NTFS partitions.
        </p>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Using Ntfs-3g
        </h2>
        <p>
          To mount a Windows partition at boot time, put a line like this in
          /etc/fstab:
        </p>
        <pre class="screen">
/dev/sda1 /mnt/windows auto defaults 0 0
</pre>
        <p>
          To allow users to mount a usb stick with an NTFS filesystem on it,
          put a line similar to this (change sdc1 to whatever a usb stick
          would be on your system) in /etc/fstab:
        </p>
        <pre class="screen">
/dev/sdc1 /mnt/usb auto user,noauto,umask=0,utf8 0 0
</pre>
        <p>
          In order for a user to be able to mount the usb stick, they will
          need to be able to write to <code class="filename">/mnt/usb</code>,
          so as the <code class="systemitem">root</code> user:
        </p>
        <pre class="userinput">
<kbd class="command">chmod -v 777 /mnt/usb</kbd>
</pre>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">lowntfs-3g, mkfs.ntfs, mkntfs,
              mount.lowntfs-3g, mount.ntfs, mount.ntfs-3g, ntfs-3g,
              ntfs-3g.probe, ntfs-3g.secaudit, ntfs-3g.usermap, ntfscat,
              ntfsclone, ntfscluster, ntfscmp, ntfscp, ntfsfix, ntfsinfo,
              ntfslabel, ntfsls, ntfsresize and ntfsundelete</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Library:</strong>
              <span class="segbody">libntfs-3g.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">/usr/include/ntfs-3g and
              /usr/share/doc/ntfs-3g</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="lowntfs-3g" name="lowntfs-3g"></a><span class=
                    "term"><span class=
                    "command"><strong>lowntfs-3g</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is similar to ntfs-3g but uses the Fuse low-level
                    interface.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="mkfs.ntfs" name="mkfs.ntfs"></a><span class=
                    "term"><span class=
                    "command"><strong>mkfs.ntfs</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a symlink to mkntfs.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="mkntfs" name="mkntfs"></a><span class=
                    "term"><span class=
                    "command"><strong>mkntfs</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    creates an NTFS file system.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="mount.lowntfs-3g" name=
                    "mount.lowntfs-3g"></a><span class="term"><span class=
                    "command"><strong>mount.lowntfs-3g</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a symlink to lowntfs-3g.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="mount.ntfs" name="mount.ntfs"></a><span class=
                    "term"><span class=
                    "command"><strong>mount.ntfs</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    mounts an NTFS filesystem.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="mount.ntfs-3g" name=
                    "mount.ntfs-3g"></a><span class="term"><span class=
                    "command"><strong>mount.ntfs-3g</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a symbolic link to ntfs-3g.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfs-3g-prog" name="ntfs-3g-prog"></a><span class=
                    "term"><span class=
                    "command"><strong>ntfs-3g</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is an NTFS driver, which can create, remove, rename, move
                    files, directories, hard links, and streams. It can also
                    read and write files, including streams, sparse files and
                    transparently compressed files. It can also handle
                    special files like symbolic links, devices, and FIFOs;
                    moreover it provides standard management of file
                    ownership and permissions, including POSIX ACLs.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfs-3g.probe" name=
                    "ntfs-3g.probe"></a><span class="term"><span class=
                    "command"><strong>ntfs-3g.probe</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    tests if an NTFS volume is mountable read only or
                    read-write, and exits with a status value accordingly.
                    The volume can be a block device or image file.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfs-3g.secaudit" name=
                    "ntfs-3g.secaudit"></a><span class="term"><span class=
                    "command"><strong>ntfs-3g.secaudit</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    audits NTFS Security Data.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfs-3g.usermap" name=
                    "ntfs-3g.usermap"></a><span class="term"><span class=
                    "command"><strong>ntfs-3g.usermap</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    creates the file defining the mapping of Windows accounts
                    to Linux logins for users who owns files which should be
                    visible from both Windows and Linux.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfscluster" name="ntfscluster"></a><span class=
                    "term"><span class=
                    "command"><strong>ntfscluster</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    identifies files in a specified region of an NTFS volume
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfscp" name="ntfscp"></a><span class=
                    "term"><span class=
                    "command"><strong>ntfscp</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    copies a file to an NTFS volume.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfsfix" name="ntfsfix"></a><span class=
                    "term"><span class=
                    "command"><strong>ntfsfix</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    fixes common errors and forces Windows to check an NTFS
                    partition.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfsls" name="ntfsls"></a><span class=
                    "term"><span class=
                    "command"><strong>ntfsls</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    lists directory contents on an NTFS filesystem.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfscat" name="ntfscat"></a><span class=
                    "term"><span class=
                    "command"><strong>ntfscat</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    prints NTFS files and streams on the standard output.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfsclone" name="ntfsclone"></a><span class=
                    "term"><span class=
                    "command"><strong>ntfsclone</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    clones an NTFS filesystem.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfscmp" name="ntfscmp"></a><span class=
                    "term"><span class=
                    "command"><strong>ntfscmp</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    compares two NTFS filesystems and tells the differences.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfsinfo" name="ntfsinfo"></a><span class=
                    "term"><span class=
                    "command"><strong>ntfsinfo</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    dumps a file's attributes.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfslabel" name="ntfslabel"></a><span class=
                    "term"><span class=
                    "command"><strong>ntfslabel</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    displays or changes the label on an ntfs file system.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfsresize" name="ntfsresize"></a><span class=
                    "term"><span class=
                    "command"><strong>ntfsresize</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    resizes an NTFS filesystem without data loss.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ntfsundelete" name="ntfsundelete"></a><span class=
                    "term"><span class=
                    "command"><strong>ntfsundelete</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    recovers a deleted file from an NTFS volume.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libntfs-3g" name="libntfs-3g"></a><span class=
                    "term"><code class="filename">libntfs-3g.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains the Ntfs-3g API functions.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-02-17 13:54:09 -0800
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="mdadm.html" title="mdadm-4.1">Prev</a>
          <p>
            mdadm-4.1
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="gptfdisk.html" title=
          "gptfdisk-1.0.5">Next</a>
          <p>
            gptfdisk-1.0.5
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="filesystems.html" title=
          "Chapter&nbsp;5.&nbsp;File Systems and Disk Management">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
